package com.wentao.thisService.mapper;

import com.wentao.thisService.model.GoodsEntity;
import com.wentao.thisService.model.entities.IntResultEntity;
import com.wentao.thisService.model.entities.PageEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

@Mapper
@Repository
public interface GoodsDao {

    public List<GoodsEntity> Search(GoodsEntity entity);

    public List<GoodsEntity> SearchPage(@Param("entityItem") GoodsEntity entityItem, @Param("pageItem") PageEntity pageItem);

    public void Update(@Param("entityItem") GoodsEntity entity, @Param("valueItem") GoodsEntity val);

    public void Insert(GoodsEntity entity);

    public List<GoodsEntity> SearchAut(GoodsEntity entity);

    public List<GoodsEntity> SearchPageAut(@Param("entityItem") GoodsEntity entityItem, @Param("pageItem") PageEntity pageItem);

    public void UpdateAut(@Param("entityItem") GoodsEntity entity, @Param("valueItem") GoodsEntity val);

    public IntResultEntity Count(GoodsEntity entity);

    public IntResultEntity CountAut(GoodsEntity entity);

    public List<Map<String, Object>> SearchGoodsInfo();

    public List<Map<String, Object>> SearchGoodsInfoByGoodsId(@Param("id") Long id);

    public List<Map<String, Object>> SearchGoodsInfoByGoodsIdList(@Param("goodsIdList") List<Long> goodsIdList);
}